//code is here, but its not supported yet
void __attribute__((naked,noinline)) sub_FFC64338_my(){
asm volatile(	
                 "LDR     R12, =0x201E\n"
                 "STMFD   SP!, {R4,LR}\n"
                 "CMP     R0, R12\n"
                 "BEQ     loc_FFC643F8\n"
                 "BGT     loc_FFC64394\n"
                 "LDR     R12, =0x2004\n"
                 "CMP     R0, R12\n"
                 "BEQ     loc_FFC64400\n"
                 "BGT     loc_FFC6437C\n"
                 "SUB     R12, R0, #0x1000\n"
                 "SUBS    R12, R12, #0xA9\n"
                 "SUBNE   R12, R0, #0x1000\n"
                 "SUBNES  R12, R12, #0xAD\n"
                 "SUBNE   R12, R0, #0x1000\n"
                 "SUBNES  R12, R12, #0xAF\n"
                 "BNE     loc_FFC64410\n"
                 "B       loc_FFC643F8\n"
 "loc_FFC6437C:\n"
                 "SUB     R12, R0, #0x2000\n"
                 "SUBS    R12, R12, #5\n"
                 "SUBNE   R12, R0, #0x2000\n"
                 "SUBNES  R12, R12, #0x1D\n"
                 "BNE     loc_FFC64410\n"
                 "B       loc_FFC643F8\n"
 "loc_FFC64394:\n"
                 "LDR     R12, =0x5004\n"
                 "CMP     R0, R12\n"
                 "BEQ     loc_FFC643F8\n"
                 "BGT     loc_FFC643C0\n"
                 "SUB     R12, R0, #0x3000\n"
                 "SUBS    R12, R12, #0xA\n"
                 "BEQ     loc_FFC643F4\n"
                 "SUB     R12, R0, #0x5000\n"
                 "SUBS    R12, R12, #1\n"
                 "BNE     loc_FFC64410\n"
                 "B       loc_FFC643F8\n"
 "loc_FFC643C0:\n"
                 "SUB     R12, R0, #0x5000\n"
                 "SUBS    R12, R12, #6\n"
                 "BEQ     loc_FFC643F8\n"
                 "SUB     R12, R0, #0x5000\n"
                 "SUBS    R12, R12, #7\n"
                 "BNE     loc_FFC64410\n"
                 "BL      sub_FFC1AAA4\n"
                 "LDR     R1, =0x5958\n"
                 "LDR     R0, [R1,#0x10]\n"
                 "CMP     R0, #7\n"
                 "LDREQ   R0, [R1,#0x18]\n"
                 "BLEQ    sub_FFC64CA8\n"
                 "B       loc_FFC64408\n"
 "loc_FFC643F4:\n"
                 "BL      sub_FFC1A054\n"
 "loc_FFC643F8:\n"
                 "LDMFD   SP!, {R4,LR}\n"
                 "B       sub_FFC64198_my\n" //------------->
 "loc_FFC64400:\n"
                 "BL      sub_FFC63220\n"
                 "BL      sub_FFC63C4C\n"
 "loc_FFC64408:\n"
                 "MOV     R0, #0\n"
                 "LDMFD   SP!, {R4,PC}\n"
 "loc_FFC64410:\n"
                 "MOV     R0, #1\n"
                 "LDMFD   SP!, {R4,PC}\n"
 );
}


void __attribute__((naked,noinline)) sub_FFC64198_my(){
asm volatile(
                 "STMFD   SP!, {R4-R6,LR}\n"
                 "BL      sub_FFC64E14\n"
                 "CMP     R0, #1\n"
                 "BLEQ    sub_FFC64EFC\n"
                 "LDR     R4, =0x5958\n"
                 "MOV     R5, #1\n"
                 "LDR     R0, [R4,#0x24]\n"
                 "CMP     R0, #0\n"
                 "LDRNE   R0, [R4,#0x4C]\n"
                 "CMPNE   R0, #0\n"
                 "BEQ     loc_FFC64204\n"
                 "BL      sub_FFC64E14\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC64204\n"
                 "BL      sub_FFC64EFC\n"
                 "LDR     R0, [R4,#0x78]\n"
                 "CMP     R0, #0\n"
                 "BNE     loc_FFC64204\n"
                 "LDR     R1, =0xFFC64318\n"
                 "MOV     R0, #0x20\n"
                 "BL      sub_FFC5AE84\n"
                 "BL      sub_FFD7C8A0\n"
                 "BL      sub_FFD7C830\n"
                 "MOV     R1, #0\n"
                 "MOV     R0, #0x51\n"
                 "BL      sub_FFC6C12C\n"
                 "STR     R5, [R4,#0x78]\n"
 "loc_FFC64204:\n"
                 "BL      sub_FFC64E14\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC64250\n"
                 "LDR     R0, [R4,#0x44]\n"
                 "CMP     R0, #0\n"
                 "BEQ     loc_FFC64250\n"
                 "LDR     R0, [R4,#0x74]\n"
                 "CMP     R0, #0\n"
                 "BNE     loc_FFC64250\n"
                 "LDR     R1, =0xFFC6432C\n"
                 "MOV     R0, #0x20\n"
                 "BL      sub_FFC5AE84\n"
                 "MOV     R1, #0\n"
                 "MOV     R0, #0x8C\n"
                 "BL      sub_FFC6C12C\n"
                 "BL      sub_FFC6A4D8\n"
                 "MOV     R0, #0x21\n"
                 "BL      sub_FFC6C16C\n"
                 "STR     R5, [R4,#0x74]\n"
 "loc_FFC64250:\n"
                 "LDR     R0, [R4,#0x38]\n"
                 "CMP     R0, #0\n"
                 "LDRNE   R0, [R4,#0x3C]\n"
                 "CMPNE   R0, #0\n"
                 "LDRNE   R0, [R4,#0x44]\n"
                 "CMPNE   R0, #0\n"
                 "LDRNE   R0, [R4,#0x48]\n"
                 "CMPNE   R0, #0\n"
                 "LDRNE   R0, [R4,#0x1C]\n"
                 "LDRNE   R1, [R4,#0x20]\n"
                 "ORRNES  R0, R0, R1\n"
                 "BEQ     loc_FFC6428C\n"
                 "BL      sub_FFC63AEC\n"
                 "BL      sub_FFC63C4C\n"
                 "B       loc_FFC642B4\n"
 "loc_FFC6428C:\n"
                 "LDR     R0, [R4,#0x58]\n"
                 "CMP     R0, #0\n"
                 "BEQ     loc_FFC642BC\n"
                 "BL      sub_FFC63B34\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC642BC\n"
                 "BL      sub_FFC664A4\n"
                 "BL      sub_FFC66460\n"
                 "MOV	  R0, #0\n"
                 "BL      sub_FFC64CE4\n"
 "loc_FFC642B4:\n"
                 "MOV     R0, #0\n"
                 "LDMFD   SP!, {R4-R6,PC}\n"
 "loc_FFC642BC:\n"
                 "BL      sub_FFC63B34\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC642E4\n"
                 "LDR     R0, [R4,#0x7C]\n"
                 "CMP     R0, #0\n"
                 "BLEQ    sub_FFC64F40_my\n"   //------------->
                 "MOV     R0, #0\n"
                 "STR     R0, [R4,#0x70]\n"
                 "STR     R0, [R4,#0x74]\n"
                 "STR     R0, [R4,#0x78]\n"
 "loc_FFC642E4:\n"
                 "MOV     R0, #1\n"
                 "LDMFD   SP!, {R4-R6,PC}\n"
);
}
void __attribute__((naked,noinline)) sub_FFC64F40_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC65160\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC5AE84\n"
                "BL      sub_FFC1A270\n"
                "BL      sub_FFC65264\n"
                "BL      sub_FFC68330_my\n" //------------->
                "MOV     R0, #1\n"
                "BL      sub_FFC635C8\n"
                "BL      sub_FFC63A70\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC63CE0\n"
 );
} 



void __attribute__((naked,noinline)) sub_FFC68330_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "LDR     R1, =0xFFC6852C\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC5AE84\n"
                "LDR     R4, =0x5BE0\n"
                "MOV     R0, #6\n"
                "MOV     R5, #1\n"
                "STR     R0, [R4,#0x5C]\n"
                "STR     R5, [R4,#0x10]\n"
                "BL      sub_FFD35DFC\n"
                "BL      sub_FFD45948\n"
                "BL      sub_FFD3C608\n"
                "BL      sub_FFD3A4B0\n"
                "BL      sub_FFC68784_my\n"  //------------->
                "BL      sub_FFD462EC\n"
                "BL      sub_FFD457F0\n"
                "MOV     R0, #1\n"
                "STR     R5, [R4,#0x18]\n"
                "BL      sub_FFC68848\n"
                "MOV     R0, #3\n"
                "STR     R0, [R4,#0x60]\n"
                "LDR     R1, [R4,#0x64]\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "MOV     R0, #0\n"
                "BX      R1\n"
 );
} 



void __attribute__((naked,noinline)) sub_FFC68784_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
			
                "LDR     R0, =0x855\n"
                "BL      sub_FFD32650\n"
                "BL      sub_FFC1A054\n"
//ultimo led qui, ok
                "BL      sub_FFC68108_my\n"  //-------------->
                "BL      sub_FFD356FC\n"
                "BL      sub_FFD25C34\n"
                "BL      sub_FFD3E56C\n"
                "BL      sub_FFD3EB5C\n"
                "BL      sub_FFD3ED78\n"
                "BL      sub_FFD45E50\n"
                "BL      sub_FFD454C8\n"
                "BL      sub_FFD3E74C\n"
                "BL      sub_FFD44F08\n"
                "BL      sub_FFD3CDE4\n"
                "BL      sub_FFD4460C\n"
                "BL      sub_FFD3B24C\n"
                "BL      sub_FFC6C220\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC6C03C\n"
 );
} 

// branches are together

void __attribute__((naked,noinline)) sub_FFC68108_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R0, =0x5C48\n"
                "LDR     R1, =sub_FFC67EF8_my\n" //------------->
                "BL      sub_FFC6CA08\n"
                "LDR     R1, =0x5BE0\n"
                "LDR     R0, =sub_FFC68028_my\n" //------------->
                "STR     R0, [R1,#0x64]\n"
                "LDMFD   SP!, {R4,PC}\n"
 );
} 

//branch 1

void __attribute__((naked,noinline)) sub_FFC67EF8_my(){ 
 asm volatile(
                "STMFD   SP!, {R3-R5,LR}\n"
                "BL      sub_FFD24A0C\n"
                "LDR     R4, =0x5BE0\n"
                "LDR     R0, [R4,#0x30]\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC67F30\n"
                "LDR     R1, =0xFFC68008\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC5AE84\n"
                "MOV     R0, #0\n"
                "STR     R0, [R4,#0x30]\n"
                "STR     R0, [R4,#0x2C]\n"
                "BL      sub_FFC67DFC\n"
                "LDMFD   SP!, {R3-R5,PC}\n"
"loc_FFC67F30:\n"
				"BL      sub_FFC155B4\n"
                "LDRH    R0, [R4,#4]\n"
                "MOV     R1, SP\n"
                "STRH    R0, [SP]\n"
                "LDR     R0, [R4,#0x5C]\n"
                "STRH    R0, [SP,#2]\n"
                "MOV     R0, #0x40\n"
                "BL      sub_FFC6C12C\n"
                "LDR     R0, [R4,#0x1C]\n"
                "CMP     R0, #0\n"
                "LDREQH  R0, [R4,#4]\n"
                "BLEQ    sub_FFC62944\n"
                "LDRH    R0, [R4,#4]\n"
                "MOV     R1, #1\n"
                "BL      sub_FFC673C4_my\n" //----------->
                "LDR     R0, [R4,#0x60]\n"
                "BL      sub_FFC68848\n"
                "MOV     R0, #3\n"
                "STR     R0, [R4,#0x60]\n"
                "LDR     R1, [R4,#0x64]\n"
                "ADD     SP, SP, #4\n"
                "LDMFD   SP!, {R4,R5,LR}\n"
                "MOV     R0, #0\n"
                "BX      R1\n"
 );
} 













//branch 2

void __attribute__((naked,noinline)) sub_FFC68028_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "LDR     R4, =0x5BE0\n"
                "LDRH    R0, [R4,#4]\n"
                "BL      sub_FFD3C840\n"
                "BL      sub_FFD3A68C\n"
                "BL      sub_FFD3E7C8\n"
                "BL      sub_FFD3EE08\n"
                //"BL      nullsub_74\n"
                "BL      sub_FFD3CF80\n"
                "BL      sub_FFD274AC\n"
				"MOV     R5, #0\n"
                "MOV     R0, R5\n"
                "STR     R5, [R4,#0x24]\n"
                "BL      sub_FFC15698\n"
                //"BL      nullsub_80\n"
                "STR     R5, [R4,#0x3C]\n"
                "LDRH    R0, [R4,#4]\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC673C4_my\n" //----------->
				//"BL      sub_FFC673C4\n" //----------->
                "BL      sub_FFC6A4D8\n"
				"BL      sub_FFD3B320\n"
                "LDR     R1, [R4,#0x5C]\n"
                "MOV     R0, #0x41\n"
				"BL      sub_FFC6C12C\n"
                "BL      sub_FFD3A658\n"
                "BL      sub_FFD35F70\n"
                "CMP     R0, #0\n"
                "BLEQ    sub_FFD3A690\n"
                "BL      sub_FFD3C7C8\n"
                "BL      sub_FFD2487C\n"
                "BL      sub_FFC60D54\n"
                "STR     R0, [R4,#0x58]\n"
                "LDR     R0, =0x8003\n"
                "STR     R5, [R4,#0x2C]\n"
                "BL      sub_FFC62A6C\n"  //PTM_GetCurrentItem
                "STRH    R0, [R4]\n"
                "LDR     R0, =0x313D\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC617D8\n" //PostLogilaEventToUI
                "BL      sub_FFC68750\n"
                "LDR     R0, [R4,#0x30]\n"
                "CMP     R0, #1\n"
                "STREQ   R5, [R4,#0x30]\n"
                "LDMEQFD SP!, {R4-R6,LR}\n"
                "BEQ     sub_FFC67DFC\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
 );
} 




//branches are joining here
//DA FARE

void __attribute__((naked,noinline)) sub_FFC673C4_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "MOV     R5, R1\n"
                "MOV     R4, R0\n"
				"MOV     R0, #0x60\n"
                "LDR     R1, =0xFFC676AC\n" //a_decidecapturemode
                "BL      sub_FFC5AE84\n"
                "LDR     R6, =0x5BE0\n"
                "LDR     R0, [R6,#0x10]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC674F0\n"
                "LDR     R0, [R6,#0x18]\n"
                "LDR     R1, =0x820A\n"
                "LDR     R2, =0xFFFE0000\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC67438\n"
                "CMP     R5, #1\n"
                "LDMEQFD SP!, {R4-R6,PC}\n"
                "CMP     R5, #0\n"
                "BNE     loc_FFC67438\n"
                "CMP     R4, R2\n"
                "BNE     loc_FFC67430\n"
				"CMP     R1, R4,LSL#17\n"
                "TSTNE   R5, #0xC00\n"
                "BEQ     loc_FFC6742C\n"
                "BL      sub_FFC68554_my\n" //------------->
				//"BL      sub_FFC68554\n" //------------->
                "B       loc_FFC67430\n"
"loc_FFC6742C:\n"
                "BL      sub_FFC684E0\n"
"loc_FFC67430:\n"
                "BL      sub_FFC68780\n"
                "B       loc_FFC674F0\n"
"loc_FFC67438:\n"
                "CMP     R4, R2\n"
                "BEQ     loc_FFC674E8\n"
                "CMP     R1, R4,LSL#17\n"
				"LDRH    R0, [R6,#2]\n"
                "TSTNE   R4, #0xC00\n"
                "BEQ     loc_FFC67498\n"
				"CMP     R0, R2\n"
                "BEQ     loc_FFC674E8\n"
                "CMP     R1, R0,LSL#17\n"
                "TSTNE   R0, #0xC00\n"
                "BEQ     loc_FFC6747C\n"
                "LDR     R1, =0xFFC676CC\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC5AE84\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC674C0\n"
                "B       loc_FFC67490\n"
"loc_FFC6747C:\n"
                "LDR     R1, =0xFFC676DC\n" //stilltomovie
                "MOV     R0, #0x60\n"
                "BL      sub_FFC5AE84\n"
                "CMP     R5, #1\n"
                "BEQ     loc_FFC674DC\n"
"loc_FFC67490:\n"
                "BL      sub_FFC68554_my\n"
                "B       loc_FFC674E8\n"			
"loc_FFC67498:\n"
				"CMP     R0, R2\n"
                "BEQ     loc_FFC674E8\n"
                "CMP     R1, R0,LSL#17\n"
                "TSTNE   R5, #0xC00\n"
                "BEQ     loc_FFC674C8\n"
                "LDR     R1, =0xFFC676EC\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC5AE84\n"
                "CMP     R5, #1\n"
                "BNE     loc_FFC674E4\n"
"loc_FFC674C0:\n"
				"LDMFD   SP!, {R4-R6,LR}\n"
                "B       sub_FFC68508\n"
"loc_FFC674C8:\n"
                "LDR     R1, =0xFFC676FC\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC5AE84\n"
                "CMP     R5, #1\n"
                "BNE     loc_FFC674E4\n"
"loc_FFC674DC:\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "B       sub_FFC68508\n"
"loc_FFC674E4:\n"
				"BL      sub_FFC684E0\n"
"loc_FFC674E8:\n"
				"CMP     R5, #0\n"
                "LDMNEFD SP!, {R4-R6,LR}\n"
"loc_FFC674F0:\n"
                "STRH    R4, [R6,#2]\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
 );
} 

void __attribute__((naked,noinline)) sub_FFC68554_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC68734\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC5AE84\n"
                "LDR     R0, =0x5BE0\n"
                "LDR     R0, [R0,#0x28]\n"
                "CMP     R0, #0\n"
                "BLNE    sub_FFC68FF4\n"
                "LDMFD   SP!, {R4,LR}\n"
                "MOV     R0, #0\n"
                "B       sub_FFC6B388_my\n"  //----------->
				);
} 


void __attribute__((naked,noinline)) sub_FFC6B388_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R4, =0x5D8C\n"
                "MOV     R0, #0\n"
                "STR     R0, [R4,#0x30]\n"
                "LDR     R0, [R4,#8]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC6B3B4\n"
                "LDR     R0, =sub_FFC6AF94_my\n" //----------->
                "MOV     R1, #0\n"
                "BL      sub_FFC60FD0\n"
                "STR     R0, [R4,#8]\n"
"loc_FFC6B3B4:\n"
                "LDR     R0, [R4,#0xC]\n"
                "CMP     R0, #0\n"
                "BNE     sub_FFC6B3D0\n"
                "LDR     R0, =0xFFC6AC34\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC68258\n"
                "STR     R0, [R4,#0xC]\n"
"sub_FFC6B3D0:\n"
                "BL      sub_FFC6BB9C\n"
                "BL      sub_FFC6AC98\n"
                "BL      sub_FFD44C10\n"
                "BL      sub_FFD46B2C\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFD24154\n"
 );
} 


void __attribute__((naked,noinline)) sub_FFC6AF94_my(){ 
 asm volatile(
 //qui
                "STMFD   SP!, {R3-R11,LR}\n"
                "LDR     R5, =0x5D8C\n"
                "MOV     R4, R1\n"
                "LDR     R2, [R5,#0x2C]\n"
                "ADD     R0, R5, #0\n"
                "LDR     R0, [R0,#0x14]\n"
                "LDR     R9, =0x3007\n"
                "CMP     R2, #0\n"
                "MOV     R1, #0\n"
                "MOV     R11, R3\n"
                "MVN     R8, #0\n"
                "BEQ     loc_FFC6B00C\n"
                "CMP     R4, R9\n"
                "BEQ     loc_FFC6B1FC\n"
                "CMP     R4, #0x800\n"
                "LDREQ   R2, [R5,#0x38]\n"
                "CMPEQ   R11, R2\n"
                "BNE     loc_FFC6B30C\n"
                "STR     R1, [R5,#0x2C]!\n"
                "CMP     R0, #0\n"
                "STR     R8, [R5,#0xC]\n"
                "BNE     loc_FFC6B380\n"
                "BL      sub_FFC1A9FC\n"
                "CMP     R0, #1\n"
                "BEQ     loc_FFC6B004\n"
                "BL      sub_FFC1AA04\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC6B380\n"
"loc_FFC6B004:\n"
                "BL      sub_FFC6ADE4\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B00C:\n"
                "CMP     R0, #1\n"
                "SUBEQ   R12, R4, #0x2000\n"
                "SUBEQS  R12, R12, #0x1C\n"
                "BNE     loc_FFC6B028\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC6B68C\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B028:\n"
                "BL      sub_FFC60278\n"
                "LDR     R10, =0x9A5\n"
                "CMP     R0, #1\n"
                "SUB     R6, R10, #4\n"
                "SUB     R7, R10, #2\n"
                "BNE     loc_FFC6B05C\n"
                "CMP     R4, R10\n"
                "CMPNE   R4, R6\n"
                "CMPNE   R4, R7\n"
                "BNE     loc_FFC6B05C\n"
                "BL      sub_FFC5F41C\n"
                "STR     R4, [R5,#0x3C]\n"
                "B       loc_FFC6B30C\n"
"loc_FFC6B05C:\n"
                "BL      sub_FFD3A4B8\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC6B07C\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC61510\n"
                "CMP     R0, #1\n"
                "CMPNE   R4, R10\n"
                "BEQ     loc_FFC6B30C\n"
"loc_FFC6B07C:\n"
                "BL      sub_FFC1AAD4\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC6B094\n"
                "CMP     R4, R6\n"
                "CMPNE   R4, R7\n"
                "BEQ     loc_FFC6B380\n"
"loc_FFC6B094:\n"
                "BL      sub_FFC68420\n"
                "LDR     R1, =0x9A2\n"
                "CMP     R0, #1\n"
                "ADD     R2, R1, #2\n"
                "BNE     loc_FFC6B0BC\n"
                "CMP     R4, R6\n"
                "CMPNE   R4, R1\n"
                "CMPNE   R4, R7\n"
                "CMPNE   R4, R2\n"
                "BEQ     loc_FFC6B380\n"
"loc_FFC6B0BC:\n"
                "LDR     R12, =0x200A\n"
                "CMP     R4, R12\n"
                "BEQ     loc_FFC6B370\n"
                "BGT     loc_FFC6B138\n"
                "LDR     R12, =0x907\n"
                "CMP     R4, R12\n"
                "MOVEQ   R1, #2\n"
                "MOVEQ   R0, R10\n"
                "BEQ     loc_FFC6B2AC\n"
                "BGT     loc_FFC6B114\n"
                "SUB     R12, R4, #0x800\n"
                "LDR     R6, =0x2003\n"
                "SUBS    R12, R12, #0x26\n"
                "BEQ     loc_FFC6B210\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x29\n"
                "BEQ     loc_FFC6B254\n"
                "CMP     R4, #0x860\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x61\n"
                "BNE     loc_FFC6B324\n"
                "B       loc_FFC6B30C\n"
"loc_FFC6B114:\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC6B2A4\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC6B370\n"
                "CMP     R4, R7\n"
                "BEQ     loc_FFC6B2A4\n"
                "CMP     R4, R2\n"
                "BEQ     loc_FFC6B370\n"
                "B       loc_FFC6B324\n"
"loc_FFC6B138:\n"
                "LDR     R12, =0x3149\n"
                "CMP     R4, R12\n"
                "MOVEQ   R1, #0\n"
                "MOVEQ   R0, #0x84\n"
                "BEQ     loc_FFC6B31C\n"
                "BGT     loc_FFC6B190\n"
                "SUB     R12, R4, #0x2000\n"
                "SUBS    R12, R12, #0x20\n"
                "MOVEQ   R1, R11\n"
                "MOVEQ   R0, #0x83\n"
                "BEQ     loc_FFC6B31C\n"
                "CMP     R4, R9\n"
                "BEQ     loc_FFC6B1E8\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x35\n"
                "BEQ     loc_FFC6B1CC\n"
                "SUB     R12, R4, #0x3000\n"
                "SUBS    R12, R12, #0x148\n"
                "BNE     loc_FFC6B324\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x86\n"
                "B       loc_FFC6B31C\n"
" loc_FFC6B190:\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x4A\n"
                "BEQ     loc_FFC6B314\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #3\n"
                "BEQ     loc_FFC6B2D0\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #8\n"
                "BEQ     loc_FFC6B2B4\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #0xF\n"
                "BNE     loc_FFC6B324\n"
                "MOV     R0, #0x82\n"
                "BL      sub_FFC6C16C\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B1CC:\n"
                "BL      sub_FFC6BBD0\n"
                "CMP     R0, #4\n"
                "BEQ     loc_FFC6B370\n"
                "LDR     R0, [R5,#0x1C]\n"
                "CMP     R0, #0\n"
                "BLNE    sub_FFC6AD2C\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B1E8:\n"
                "MOV     R0, #1\n"
                "STR     R0, [R5,#0x1C]\n"
                "LDR     R0, [R5,#0x18]\n"
                "CMP     R0, #1\n"
                "BNE      loc_FFC6B204\n"
"loc_FFC6B1FC:\n"
                "BL      sub_FFC6AD2C\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
" loc_FFC6B204:\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC6AF04\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B210:\n"
                "BL      sub_FFC68420\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC6B228\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC68414\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B228:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORR     R0, R0, R1\n"
                "LDR     R1, [R5,#0x1C]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC6B380\n"
                "MOV     R1, #0\n"
                "MOV     R0, R6\n"
                "BL      sub_FFC4C8B8\n"
                "BL      sub_FFD29EF4\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B254:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC6B380\n"
                "BL      sub_FFC62368\n"
                "CMP     R0, #0\n"
                "LDREQ   R0, [R5,#0x1C]\n"
                "CMPEQ   R0, #0\n"
                "BNE     loc_FFC6B380\n"
                "BL      sub_FFC6842C\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC6B380\n"
                "BL      sub_FFD46BDC\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC6B380\n"
                "MOV     R1, #0\n"
                "MOV     R0, R6\n"
                "BL      sub_FFC4C8B8\n"
                "BL      sub_FFD25730\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B2A4:\n"
                "MOV     R1, #1\n"
                "MOV     R0, R4\n"
"loc_FFC6B2AC:\n"
                "BL      sub_FFC6AE40_my\n" //------------->
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC6B2B4:\n"
                "MOV     R0, R11\n"
                "BL      sub_FFC66D70\n"
                "CMP     R0, #0\n"
                "MOVEQ   R1, R11\n"
                "MOVEQ   R0, R4\n"
                "BLEQ    sub_FFC6B83C_my\n"  //----------->
				//"BLEQ    sub_FFC6B83C\n"
                "B       loc_FFC6B30C\n"
"loc_FFC6B2D0:\n"
                "LDR     R0, [R5,#0x3C]\n"
                "CMN     R0, #1\n"
                "BEQ     loc_FFC6B30C\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC5E500\n"
                "LDR     R0, [R5,#0x3C]\n"
                "CMP     R0, R6\n"
                "BNE     loc_FFC6B2FC\n"
                "BL      sub_FFC1A9FC\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC6B308\n"
"loc_FFC6B2FC:\n"
                "LDR     R0, [R5,#0x3C]\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC6178C\n"    // PostLogicalEventForNotPowerType
"loc_FFC6B308:\n"
                "STR     R8, [R5,#0x3C]\n"
"loc_FFC6B30C:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC6B314:\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x85\n"
"loc_FFC6B31C:\n"
                "BL      sub_FFC6C12C\n"
                "B       loc_FFC6B380\n"
"loc_FFC6B324:\n"
                "LDR     R12, =0x0855\n"
                "CMP     R4, R12\n"
                "BEQ     loc_FFC6B360\n"
                "BGT     loc_FFC6B34C\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x38\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x39\n"
                "BNE     loc_FFC6B370\n"
                "B       loc_FFC6B360\n"
"loc_FFC6B34C:\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x56\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x5D\n"
                "BNE     loc_FFC6B370\n"
"loc_FFC6B360:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC6B380\n"
"loc_FFC6B370:\n"
                "MOV     R1, R11\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC6B83C_my\n"  //----------------->
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC6B380:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
 );
} 






void __attribute__((naked,noinline)) sub_FFC6AE40_my(){
asm volatile(
                 "STMFD   SP!, {R4-R6,LR}\n"
                 "MOV     R4, R0\n"
                 "LDR     R0, =0x5D8C\n"
                 "MOV     R5, R1\n"
                 "LDR     R0, [R0,#0x1C]\n"
                 "CMP     R0, #0\n"
                 "LDRNE   R1, =0xFFC6AF70\n"
                 "BNE     loc_FFC6AEEC\n"
                 "BL      sub_FFC6BBDC\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC6AE6C\n"
 "loc_FFC6AE6C:\n"
                 "MOV     R0, R4\n"
                 "LDMFD   SP!, {R4-R6,LR}\n"
                 "MOV     R1, #0\n"
                 "B       sub_FFC6B83C_my\n" //------------->
 "loc_FFC6AE7C:\n"
                 "CMP     R5, #2\n"
                 "BNE     loc_FFC6AE94\n"
                 "BL      sub_FFC6A4D8\n"
                 "CMP     R0, #0\n"
                 "BEQ     loc_FFC6AEDC\n"
                 "B       loc_FFC6AEA8\n"
 "loc_FFC6AE94:\n"
                 "CMP     R5, #1\n"
                 "BNE     loc_FFC6AEDC\n"
                 "BL      sub_FFC6A4F0\n"
                 "CMP     R0, #0\n"
                 "BNE     loc_FFC6AEDC\n"
 "loc_FFC6AEA8:\n"
                 "MOV     R0, #0\n"
                 "BL      sub_FFC5E500\n"
                 "SUB     R12, R4, #0x900\n"
                 "SUBS    R12, R12, #0xA1\n"
                 "SUBNE   R12, R4, #0x900\n"
                 "SUBNES  R12, R12, #0xA3\n"
                 "SUBNE   R12, R4, #0x900\n"
                 "SUBNES  R12, R12, #0xA5\n"
                 "LDREQ   R0, =0xC507\n"
                 "MOVEQ   R1, #0\n"
                 "BLEQ    sub_FFC4C8B8\n"
 "loc_FFC6AED4:\n"
                 "MOV     R0, #0\n"
                 "LDMFD   SP!, {R4-R6,PC}\n"
 "loc_FFC6AEDC:\n"
                 "BL      sub_FFC6ADE4\n"
                 "CMP     R0, #0\n"
                 "BNE     loc_FFC6AEF8\n"
                 "LDR     R1, =0xFFC6AF80\n"
 "loc_FFC6AEEC:\n"
                 "MOV     R0, #0x60\n"
                 "BL      sub_FFC5AE84\n"
                 "B       loc_FFC6AED4\n"
 "loc_FFC6AEF8:\n"
                 "MOV     R0, R5\n"
                 "BL      sub_FFD39568\n"
                 "B       loc_FFC6AE6C\n"
 );
}








void __attribute__((naked,noinline)) sub_FFC6B83C_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "MOV     R7, R1\n"
                "MOV     R4, R0\n"
                "BL      sub_FFC6BC58\n"
                "LDR     R5, =0x5DD0\n"
                "LDR     R3, =0x200A\n"
                "LDR     R12, [R5]\n"
                "LDR     R2, =0x4008\n"
                "LDR     R6, =0x9A3\n"
                "LDR     R0, =0x3007\n"
                "LDR     R1, =0x1051\n"
                "CMP     R12, #9\n"
                "ADD     LR, R3, #0x15\n"
                "ADDLS   PC, PC, R12,LSL#2\n"
                "B       loc_FFC6BB94\n"
"loc_FFC6B878:\n"
                "B       loc_FFC6B8A0\n"
"loc_FFC6B87C:\n"
                "B       loc_FFC6B8B0\n"
"loc_FFC6B880:\n"
                "B       loc_FFC6B8C0\n"
"loc_FFC6B884:\n"
                "B       loc_FFC6B934\n"
"loc_FFC6B888:\n"
                "B       loc_FFC6B974\n"
"loc_FFC6B88C:\n"
                "B       loc_FFC6B9FC\n"
"loc_FFC6B890:\n"
                "B       loc_FFC6BA2C\n"
"loc_FFC6B894:\n"
                "B       loc_FFC6BADC\n"
"loc_FFC6B898:\n"
                "B       loc_FFC6BAA0\n"
"loc_FFC6B89C:\n"
                "B       loc_FFC6BB04\n"
"loc_FFC6B8A0:\n"
                "MOV     R1, R7\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4-R8,LR}\n"
                "B       sub_FFC657B8\n"
"loc_FFC6B8B0:\n"
                "MOV     R1, R7\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4-R8,LR}\n"
                "B       sub_FFC6BDD8_my\n"  //------------>
"loc_FFC6B8C0:\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC6B924\n"
                "SUB     R12, R4, #0x2000\n"
                "SUBS    R12, R12, #6\n"
                "BEQ     loc_FFC6B8E8\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC6B92C\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x4B\n"
                "BNE     loc_FFC6BB94\n"
"loc_FFC6B8E8:\n"
                "BL      sub_FFC6ADC0\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC6BC40\n"
                "LDR     R0, [R5,#8]\n"
                "CMP     R0, #0\n"
                "MOVNE   R1, #0\n"
                "MOVNE   R0, R6\n"
                "BNE     loc_FFC6B91C\n"
                "LDR     R0, [R5,#4]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC6BB44\n"
                "LDR     R0, =0x9A1\n"
                "MOV     R1, #0\n"
"loc_FFC6B91C:\n"
                "BL      sub_FFC6B7B8\n"
                "B       loc_FFC6BB44\n"
"loc_FFC6B924:\n"
                "BL      sub_FFC6BD4C\n"
                "B       loc_FFC6BB44\n"
"loc_FFC6B92C:\n"
                "BL      sub_FFC6BD64\n"
                "B       loc_FFC6BB44\n"
"loc_FFC6B934:\n"
                "SUB     R12, R4, #0x900\n"
                "SUBS    R12, R12, #0xA2\n"
                "BEQ     loc_FFC6B964\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC6B95C\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC6B96C\n"
                "CMP     R4, R0\n"
                "BLEQ    sub_FFC6BD64\n"
                "B       loc_FFC6BB94\n"
"loc_FFC6B95C:\n"
                "BL      sub_FFC6B75C_my\n"  //---------------->
                "B       loc_FFC6BB94\n"
"loc_FFC6B964:\n"
                "BL      sub_FFC6BD28\n"
                "B       loc_FFC6BB94\n"
"loc_FFC6B96C:\n"
                "BL      sub_FFC6BD4C\n"
                "B       loc_FFC6BB94\n"
"loc_FFC6B974:\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC6B9D0\n"
                "BGT     loc_FFC6B99C\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC6B9B8\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC6B9E8\n"
"loc_FFC6B990:\n"
                "CMP     R4, R3\n"
                "BNE     loc_FFC6BB94\n"
                "B       loc_FFC6B9AC\n"
"loc_FFC6B99C:\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC6B9DC\n"
"loc_FFC6B9A4:\n"
                "CMP     R4, R2\n"
                "BNE     loc_FFC6BB94\n"
"loc_FFC6B9AC:\n"
                "BL      sub_FFC6BDB4\n"
                "BL      sub_FFC6BD28\n"
                "B       loc_FFC6BB44\n"
"loc_FFC6B9B8:\n"
                "BL      sub_FFC170D4\n"
                "MOV     R0, #5\n"
                "BL      sub_FFC6BC40\n"
                "MOV     R0, #0\n"
                "STR     R0, [R5,#0xC]\n"
                "B       loc_FFC6BB44\n"
"loc_FFC6B9D0:\n"
                "MOV     R0, #5\n"
                "BL      sub_FFC6BC40\n"
                "B       loc_FFC6BA20\n"
"loc_FFC6B9DC:\n"
                "BL      sub_FFC170D4\n"
                "BL      sub_FFC6BDB4\n"
                "B       loc_FFC6BAD4\n"
"loc_FFC6B9E8:\n"
                "BL      sub_FFC170D4\n"
                "BL      sub_FFC6BDB4\n"
                "B       loc_FFC6BA34\n"
"loc_FFC6B9F4:\n"
                "BL      sub_FFC6BC40\n"
                "B       loc_FFC6BB44\n"
"loc_FFC6B9FC:\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC6BA20\n"
                "BGT     loc_FFC6BA14\n"
                "CMP     R4, R1\n"
                "BNE     loc_FFC6B990\n"
                "B       loc_FFC6BA34\n"
"loc_FFC6BA14:\n"
                "CMP     R4, R0\n"
                "BNE     loc_FFC6B9A4\n"
                "B       loc_FFC6BAD4\n"
"loc_FFC6BA20:\n"
                "MOV     R0, R7\n"
                "BL      sub_FFC6BD80\n"
                "B       loc_FFC6BB44\n"
"loc_FFC6BA2C:\n"
                "CMP     R4, R1\n"
                "BNE     loc_FFC6BB94\n"
"loc_FFC6BA34:\n"
                "MOV     R0, #8\n"
                "B       loc_FFC6B9F4\n"
"loc_FFC6BAA0:\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC6BAD4\n"
                "BGT     loc_FFC6BAC0\n"
                "CMP     R4, R3\n"
                "BEQ     loc_FFC6B924\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC6BA20\n"
                "B       loc_FFC6BB94\n"
"loc_FFC6BAC0:\n"
                "CMP     R4, R2\n"
                "SUBNE   R12, R4, #0x4000\n"
                "SUBNES  R12, R12, #0xE\n"
                "BEQ     loc_FFC6B924\n"
                "B       loc_FFC6BB94\n"
"loc_FFC6BAD4:\n"
                "MOV     R0, #7\n"
                "B       loc_FFC6B9F4\n"
"loc_FFC6BADC:\n"
                "CMP     R4, R3\n"
                "BEQ     loc_FFC6BAF4\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC6BA20\n"
                "CMP     R4, R2\n"
                "BNE     loc_FFC6BB94\n"
"loc_FFC6BAF4:\n"
                "BL      sub_FFC6BD28\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC6AF04\n"
                "B       loc_FFC6BB44\n"
"loc_FFC6BB04:\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x4A\n"
                "BEQ     loc_FFC6BB4C\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC6BB84\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC6BB74\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x2A\n"
                "BNE     loc_FFC6BB94\n"
                "BL      sub_FFC6BCE0\n"
                "LDR     R0, [R5,#0x14]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC6BB44\n"
                "BL      sub_FFC6BCFC_my\n"  //---------------->
                "BL      sub_FFD3A4C4\n"
"loc_FFC6BB44:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC6BB4C:\n"
                "BL      sub_FFC6BCE0\n"
                "LDR     R0, =0x8007\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC62A64\n" //J_ptm_setcurrentitem
                "BL      sub_FFD3951C\n"
                "BL      sub_FFC6BD28\n"
                "BL      sub_FFD3A4C4\n"
                "BL      sub_FFC6ADC0\n"
                "MOV     R0, #0\n"
                "B       loc_FFC6B9F4\n"
"loc_FFC6BB74:\n"
                "BL      sub_FFC6BCE0\n"
                "BL      sub_FFD3951C\n"
                "BL      sub_FFD3A4C4\n"
                "B       loc_FFC6B92C\n"
"loc_FFC6BB84:\n"
                "BL      sub_FFC6BCE0\n"
                "BL      sub_FFD3951C\n"
                "BL      sub_FFD3A4C4\n"
                "B       loc_FFC6B924\n"
"loc_FFC6BB94:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
                ".ltorg\n"  
 );
} 








void __attribute__((naked,noinline)) sub_FFC6BDD8_my(){ 
 asm volatile(
                "LDR     R3, =0x5DD0\n"
                "LDR     R12, =0x2006\n"
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, [R3,#0xC]\n"
                "LDR     R2, [R3,#0x14]\n"
                "CMP     R0, R12\n"
                "BEQ     loc_FFC6BE4C\n"
                "BGT     loc_FFC6BE18\n"
                "SUB     R12, R0, #0x900\n"
                "SUBS    R12, R12, #0xA2\n"
                "BEQ     loc_FFC6BE70\n"
                "SUB     R12, R0, #0x1000\n"
                "SUBS    R12, R12, #0x51\n"
                "BNE     loc_FFC6BE94\n"
                "BL      sub_FFC6BD4C\n"
                "B       loc_FFC6BE8C\n"
"loc_FFC6BE18:\n"
                "SUB     R12, R0, #0x3000\n"
                "SUBS    R12, R12, #7\n"
                "BEQ     loc_FFC6BE88\n"
                "SUB     R12, R0, #0x3100\n"
                "SUBS    R12, R12, #0x4B\n"
                "BNE     loc_FFC6BE94\n"
                "CMP     R2, #0\n"
                "BNE     loc_FFC6BE8C\n"
                "LDR     R0, [R3,#8]\n"
                "ORRS    R0, R0, R1\n"
                "BEQ     loc_FFC6BE58\n"
                "BL      sub_FFC6B75C_my\n"  //------------>
                "B       loc_FFC6BE8C\n"
"loc_FFC6BE4C:\n"
                "CMP     R2, #0\n"
                "BLEQ    sub_FFC6A510\n"
                "B       loc_FFC6BE8C\n"
"loc_FFC6BE58:\n"
                "LDR     R0, [R3,#4]\n"
                "CMP     R0, #0\n"
                "MOVNE   R0, #3\n"
                "BNE     loc_FFC6BE80\n"
                "BL      sub_FFC6BD28\n"
                "B       loc_FFC6BE8C\n"
"loc_FFC6BE70:\n"
                "CMP     R1, #0\n"
                "BNE     loc_FFC6BE8C\n"
                "BL      sub_FFC16B7C\n"
                "MOV     R0, #2\n"
"loc_FFC6BE80:\n"
                "BL      sub_FFC6BC40\n"
                "B       loc_FFC6BE8C\n"
"loc_FFC6BE88:\n"
                "BL      sub_FFC6BD64\n"
"loc_FFC6BE8C:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4,PC}\n"
"loc_FFC6BE94:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R4,PC}\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC6B75C_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC6BA3C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC5AE84\n"
                "LDR     R4, =0x5DD0\n"
                "LDR     R0, [R4,#0x10]\n"
                "CMP     R0, #0\n"
                "LDMEQFD SP!, {R4,LR}\n"
                "BEQ     sub_FFC6BCFC_my\n"  //------------->
                "LDR     R1, =0xFFC6BA58\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC5AE84\n"
                "BL      sub_FFD3A4F0\n"
                "LDR     R0, [R4,#0x18]\n"
                "CMP     R0, #1\n"
                "MOVNE   R0, #1\n"
                "STRNE   R0, [R4,#0x18]\n"
                "BLNE    sub_FFC6211C\n"    //LockMainPower
                "MOV     R0, #9\n"
                "BL      sub_FFC6BC40\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFD393D8\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC6BCFC_my(){ 
 asm volatile(

                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC6BEB4\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC5AE84\n"
                "LDR     R1, =0x5DD0\n"
                "MOV     R0, #0\n"
                "STR     R0, [R1,#0xC]\n"
                "MOV     R0, #4\n"
                "BL      sub_FFC6BC40\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC6B428_my\n" //------------->
 );
} 

void __attribute__((naked,noinline)) sub_FFC6B428_my(){ 
 asm volatile(
                "LDR     R0, =0x5D8C\n"
                "STMFD   SP!, {R3,LR}\n"
                "LDR     R1, [R0,#0x40]\n"
                "CMP     R1, #1\n"
                "MOVNE   R1, #1\n"
                "STRNE   R1, [R0,#0x40]\n"
                "BLNE    sub_FFC6211C\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x80\n"
                "BL      sub_FFC6C12C\n"
                "MOV     R2, #2\n"
                "MOV     R1, SP\n"
                "MOV     R0, #0x6B\n"
                "BL      sub_FFC5DAB4\n"
                "MOV     R2, #2\n"
                "MOV     R1, SP\n"
                "MOV     R0, #0xA3\n"
                "BL      sub_FFC5D9B4\n"
                "BL      sub_FFC4C978\n"
                "BL      sub_FFC6A7CC\n"
                "BL      sub_FFC1709C_my\n" //---------------->
                "BL      sub_FFC6AD78\n"
                "LDMFD   SP!, {R12,PC}\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC1709C_my(){ 
 asm volatile(	
                "STMFD   SP!, {R4,LR}\n"
                "MOV     R4, R0\n"
                "MOV     R0, #0x20\n"
                "LDR     R1, =0xFFC17250\n"
                "BL      sub_FFC5AE84\n"
                "BL      sub_FFC17440\n"
                "CMP     R0, #0\n"
                "LDMNEFD SP!, {R4,PC}\n"
                "MOV     R0, #4\n"
                "BL      sub_FFC4A04C\n"
                "BL      sub_FFC4DFF8\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC50134_my\n" //----------------->
 );
} 








void __attribute__((naked,noinline)) sub_FFC50134_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "MOV     R8, R0\n"
                "MOV     R0, #0x41\n"
                "SUB     SP, SP, #0x38\n"
                "MOV     R5, #0\n"
                "STR     R0, [SP,#0x34]\n"
                "BL      sub_FFC50104\n"
                "CMP     R0, #0\n"
                "LDRNE   R1, =0x163\n"
                "BNE     loc_FFC502E0\n"
                "LDR     R4, =0x54FC\n"
                "MOV     R1, #0x5E\n"
                "LDR     R0, [R4,#0x8]\n"
                "BL      sub_FFC178B8\n"
                "BL      sub_FFC5DC44\n"
                "STR     R0, [R4,#4]\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC57A88\n"
                "STR     R0, [SP,#0x28]\n"
                "ADD     R0, SP, #0x28\n"
                "MOV     R1, SP\n"
                "BL      sub_FFC57BD4\n"
                "MOV     R0, SP\n"
                "BL      sub_FFC57ABC\n"
                "STR     R0, [SP,#0x2C]\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x34\n"
                "BL      sub_FFC5DF58\n"
                "LDR     R7, [SP,#0x2C]\n"
                "BL      sub_FFC50624\n"
                "MOV     R6, #0\n"
                "ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "STR     R6, [SP,#0x2C]\n"
                "STR     R6, [SP,#0x28]\n"
                "BL      sub_FFC1FD40\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x2F\n"
                "BL      sub_FFC5DF58\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x28\n"
                "MOV     R1, #0x2F\n"
                "BL      sub_FFC5DF58\n"
				"LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x2D\n"
                "BL      sub_FFC5DF58\n"              
                "ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "BL      sub_FFC236A0\n"
				"LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x28\n"
                "MOV     R1, #0x30\n"
                "BL      sub_FFC5DF58\n"
				"ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "BL      sub_FFC20518\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x2E\n"
                "BL      sub_FFC5DF58\n"
				
				"LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x28\n"
                "MOV     R1, #0xB8\n"
                "BL      sub_FFC5E004\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x142\n"
                "LDRNE   R0, =0xFFC50558\n"
                "BLNE    sub_FFC0BDB8\n"
                "LDRH    R0, [SP,#0x2C]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x28\n"
                "CMP     R0, #0\n"
                "MOVNE   R0, #1\n"
                "STR     R0, [SP,#0x28]\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R1, #0x92\n"
                "BL      sub_FFC5DF58\n"
                "MOV     R2, #1\n"
                "ADD     R1, SP, #0x34\n"
                "MOV     R0, #0xFA\n"
                "BL      sub_FFC5DAB4\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x17A\n"
                "LDRNE   R0, =0xFFC50558\n"
                "BLNE    sub_FFC5DF58\n"
                "LDRB    R0, [SP,#0x34]\n"
                "MOV     R3, R8\n"
                "MOV     R2, #0x14\n"
                "AND     R1, R0, #0xFF\n"
                "ADD     R0, SP, #0x30\n"
                "STR     R7, [SP]\n"
                "BL      sub_FFCF2114\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x17E\n"
                "BNE     loc_FFC502E0\n"
                "LDR     R0, =0x188B0\n"
                "LDR     R1, [SP,#0x30]\n"
                "MOV     R2, #0x10\n"
                "BL      sub_FFCE4FB8\n"
                "TST     R0, #1\n"
                "BEQ     loc_FFC502F0\n"
                "LDR     R1, =0x186\n"
"loc_FFC502E0:\n"
                "LDR     R0, =0XFFC50558\n"
                "BL      sub_FFC0BDB8\n"
"loc_FFC502E8:\n"
                "ADD     SP, SP, #0x38\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC502F0:\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x30\n"
                "MOV     R1, #0x2B\n"
                "BL      sub_FFC5DF58\n"
                "BL      sub_FFC6C358\n"
                "LDRSB   R1, [SP,#0x34]\n"
                "CMP     R0, R1\n"
                "MOVEQ   R7, #0\n"
                "BEQ     loc_FFC50344\n"
                "LDR     R5, =0x188B0\n"
                "MOV     R0, R5\n"
                "BL      sub_FFC6C4D4\n"
                "MOV     R8, R0\n"
                "BL      sub_FFC9B9B4\n"
                "CMP     R8, R0\n"
                "MOV     R7, R0\n"
                "LDRLS   R1, =0x193\n"
                "LDRLS   R0, =0XFFC50558\n"
                "BLLS    sub_FFC0BDB8\n"
                "SUB     R7, R8, R7\n"
"loc_FFC50344:\n"
                "BL      sub_FFC4BCC4_my\n"   //----------------------->
                "LDR     R0, =0x188D4\n"
                "LDRH    R3, [R0,#0x46]\n"
                "LDRH    R2, [R0,#0x44]\n"
                "LDR     R1, [R0,#0x40]\n"
                "LDR     R0, [R0,#0x3C]\n"
                "BL      sub_FFC4AD44\n"
                "MOV     R3, #0\n"
                "LDR     R2, =0xFFC500CC\n"
                "MOV     R1, #0\n"
                "LDR     R0, =0xFFC500E0\n"
                "ADD     R8, SP, #0xC\n"
                "STMIA   R8, {R0-R3}\n"
                "LDR     R2, =0xFFC500F0\n"
                "LDR     R1, =0xFFC500DC\n"
                "STMEA   SP, {R1-R3}\n"
                "LDR     R1, [R4,#4]\n"
                "MOV     R3, R6\n"
                "MOV     R2, R7\n"
                "MOV     R0, R5\n"
                "BL      sub_FFC4B0A0\n"
                "LDR     R0, [R4,#0xC]\n"
                "MOV     R1, #0x20\n"
                "BL      sub_FFC17884\n"
                "B       loc_FFC502E8\n"
 );
} 


void __attribute__((naked,noinline)) sub_FFC4BCC4_my(){ 
 asm volatile(
                "STMFD   SP!, {R3-R9,LR}\n"
                "LDR     R5, =0x5390\n"
                "MOV     R6, #0\n"
                "STR     R6, [R5,#0x20]\n"
                "LDR     R0, [R5,#4]\n"
                "LDR     R8, =0x2710\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC4BD7C\n"
                "MOV     R0, #1\n"
                "STR     R0, [R5,#4]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC0BC34\n"
                "STR     R0, [R5,#0x10]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC0BC34\n"
                "STR     R0, [R5,#0x14]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0xA\n"
                "BL      sub_FFC0BBEC\n"
                "STR     R0, [R5,#0x18]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0xA\n"
                "BL      sub_FFC0BBEC\n"
                "LDR     R7, =0x184C4\n"
                "MOV     R4, #9\n"
                "ADD     R9, R4, #0x2D4\n"
                "STR     R0, [R5,#0x1C]\n"
"loc_FFC4BD38:\n"
                "RSB     R0, R4, R4,LSL#3\n"
                "STR     R6, [R7,R0,LSL#2]\n"
                "ADD     R1, R7, R0,LSL#2\n"
                "STR     R9, [SP]\n"
                "LDR     R0, [R5,#0x1C]\n"
                "LDR     R3, =0xFFC4B040\n"
                "MOV     R2, R8\n"
                "BL      sub_FFC0BCF8\n"
                "SUBS    R4, R4, #1\n"
                "BPL     loc_FFC4BD38\n"
                "MOV     R3, #0\n"
                "STR     R3, [SP]\n"
                "LDR     R3, =MovieRecord_Task_my\n"    // ----------------->
                "MOV     R2, #0x1000\n"
                "MOV     R1, #0x14\n"
                "LDR     R0, =0XFFC4BECC\n"    // "Movierecord"
                "BL      sub_FFC0BBB8\n"
"loc_FFC4BD7C:\n"
                "BL      sub_FFD13718\n"
                "BL      sub_FFC4BDE0\n"
                "MOV     R1, R0\n"
                "MOV     R0, #0xB\n"
                "ADD     R3, R0, #0x2DC\n"
                "STR     R0, [R1]\n"
                "STR     R3, [SP]\n"
                "LDR     R3, =0xFFC4B040\n"
                "MOV     R2, R8\n"
                "LDR     R0, [R5,#0x18]\n"
                "BL      sub_FFC0BCF8\n"
                "LDMFD   SP!, {R3-R9,PC}\n"
 );
} 


void __attribute__((naked,noinline)) MovieRecord_Task_my(){ 
 asm volatile(
                "STMFD   SP!, {R2-R8,LR}\n"
                "LDR     R8, =0x32B\n"
                "LDR     R7, =0x2710\n"
                "LDR     R4, =0x5390\n"
                "MOV     R6, #0\n"
                "MOV     R5, #1\n"
"loc_FFC4BBD4:\n"
                "LDR     R0, [R4,#0x18]\n"
                "MOV     R2, #0\n"
                "ADD     R1, SP, #4\n"
                "BL      sub_FFC17B08\n"
                "LDR     R0, [R4,#0x20]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC4BCA4\n"
                "LDR     R0, [SP,#4]\n"
                "LDR     R1, [R0]\n"
                "SUB     R1, R1, #2\n"
                "CMP     R1, #9\n"
                "ADDLS   PC, PC, R1,LSL#2\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC08:\n"
                "B       loc_FFC4BC58\n"
"loc_FFC4BC0C:\n"
                "B       loc_FFC4BC78\n"
"loc_FFC4BC10:\n"
                "B       loc_FFC4BC88\n"
"loc_FFC4BC14:\n"
                "B       loc_FFC4BC90\n"
"loc_FFC4BC18:\n"
                "B       loc_FFC4BC60\n"
"loc_FFC4BC1C:\n"
                "B       loc_FFC4BC98\n"
"loc_FFC4BC20:\n"
                "B       loc_FFC4BC68\n"
"loc_FFC4BC24:\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC28:\n"
                "B       loc_FFC4BCA0\n"
"loc_FFC4BC2C:\n"
                "B       loc_FFC4BC30\n"
"loc_FFC4BC30:\n"
                "LDR     R0, =0xFFC4B8B8\n"
                "STR     R6, [R4,#0x34]\n"
                "STR     R0, [R4,#0xA0]\n"
                "LDR     R0, =0xFFC4B330\n"
                "LDR     R2, =0xFFC4B24C\n"
                "LDR     R1, =0x185EC\n" //A POSSIBLE FLAG?
                "STR     R6, [R4,#0x24]\n"
                "BL      sub_FFC2A0FC\n"
                "STR     R5, [R4,#0x38]\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC58:\n"
                //"BL      unlock_optical_zoom\n" //  +
                "BL      sub_FFC4B9B0\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC60:\n"
                "BL      sub_FFC4B6B8_my\n"  //------------------->
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC68:\n"
                "LDR     R1, [R0,#0x10]\n"
                "LDR     R0, [R0,#4]\n"
                "BL      sub_FFD14324\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC78:\n"
                "LDR     R0, [R4,#0x38]\n"
                "CMP     R0, #5\n"
                "STRNE   R5, [R4,#0x28]\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC88:\n"
                "BL      sub_FFC4B4C0\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC90:\n"
                "BL      sub_FFC4B37C\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BC98:\n"
                "BL      sub_FFC4B1D8\n"
                "B       loc_FFC4BCA4\n"
"loc_FFC4BCA0:\n"
                "BL      sub_FFC4BE0C\n"
"loc_FFC4BCA4:\n"
                "LDR     R1, [SP,#4]\n"
                "LDR     R3, =0xFFC4B040\n"
                "STR     R6, [R1]\n"
                "STR     R8, [SP]\n"
                "LDR     R0, [R4,#0x1C]\n"
                "MOV     R2, R7\n"
                "BL      sub_FFC0BCF8\n"
                "B       loc_FFC4BBD4\n"
 );
} 

void __attribute__((naked,noinline)) sub_FFC4B6B8_my(){ 
 asm volatile(                                   	
                "STMFD   SP!, {R4-R8,LR}\n"
                "SUB     SP, SP, #0x40\n"
                "MOV     R6, #0\n"
                "LDR     R5, =0x5390\n"
                "MOV     R4, R0\n"
                "STR     R6, [SP,#0x30]\n"
                "STR     R6, [SP,#0x28]\n"
                "LDR     R0, [R5,#0x38]\n"
                "MOV     R8, #4\n"
                "CMP     R0, #3\n"
                "STREQ   R8, [R5,#0x38]\n"
                "LDR     R0, [R5,#0xA0]\n"
          //    "BLX     R0\n"                   
                ".long   0xE12FFF30\n"
                "LDR     R0, [R5,#0x38]\n"
                "CMP     R0, #4\n"
                "BNE     loc_FFC4B790\n"
                "ADD     R3, SP, #0x28\n"
                "ADD     R2, SP, #0x2C\n"
                "ADD     R1, SP, #0x30\n"
                "ADD     R0, SP, #0x34\n"
                "BL      sub_FFD144B8\n"
                "CMP     R0, #0\n"
                "MOV     R7, #1\n"
                "BNE     loc_FFC4B734\n"
                "LDR     R1, [R5,#0x28]\n"
                "CMP     R1, #1\n"
                "BNE     loc_FFC4B798\n"
                "LDR     R1, [R5,#0x50]\n"
                "LDR     R2, [R5,#0x3C]\n"
                "CMP     R1, R2\n"
                "BCC     loc_FFC4B798\n"
"loc_FFC4B734:\n"
                "CMP     R0, #0x80000001\n"
                "STREQ   R8, [R5,#0x54]\n"
                "BEQ     loc_FFC4B76C\n"
                "CMP     R0, #0x80000003\n"
                "STREQ   R7, [R5,#0x54]\n"
                "BEQ     loc_FFC4B76C\n"
                "CMP     R0, #0x80000005\n"
                "MOVEQ   R0, #2\n"
                "BEQ     loc_FFC4B768\n"
                "CMP     R0, #0x80000007\n"
                "STRNE   R6, [R5,#0x54]\n"
                "BNE     loc_FFC4B76C\n"
                "MOV     R0, #3\n"
"loc_FFC4B768:\n"
                "STR     R0, [R5,#0x54]\n"
"loc_FFC4B76C:\n"
                "LDR     R0, =0x1861C\n"
                "LDR     R0, [R0,#8]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC4B784\n"
                "BL      sub_FFC36694\n"
                "B       loc_FFC4B788\n"
"loc_FFC4B784:\n"
                "BL      sub_FFC4B1D8\n"
"loc_FFC4B788:\n"
                "MOV     R0, #5\n"
                "STR     R0, [R5,#0x38]\n"
"loc_FFC4B790:\n"
                "ADD     SP, SP, #0x40\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC4B798:\n"
                "LDR     LR, [SP,#0x30]\n"
                "CMP     LR, #0\n"
                "BEQ     loc_FFC4B860\n"
                "STR     R7, [R5,#0x2C]\n"
                "LDR     R0, [R5,#0x6C]\n"
                "LDR     R1, [R4,#0x14]\n"
                "LDR     R2, [R4,#0x18]\n"
                "LDR     R12, [R4,#0xC]\n"
                "ADD     R3, SP, #0x38\n"
                "ADD     R8, SP, #0x14\n"
                "STMIA   R8, {R0-R3}\n"
                "LDR     R3, [R5,#0x58]\n"
                "ADD     R2, SP, #0x3C\n"
                "ADD     R8, SP, #8\n"
            //  "LDRD    R0, [SP,#0x28]\n"      
                ".long   0xE1CD02D8\n"
                "STMIA   R8, {R0,R2,R3}\n"
                "STR     R1, [SP,#4]\n"
                "STR     LR, [SP]\n"
                "LDMIB   R4, {R0,R1}\n"
                "LDR     R3, [SP,#0x34]\n"
                "MOV     R2, R12\n"
                "BL      sub_FFCD0014\n"
                "LDR     R0, [R5,#0x10]\n"
                "MOV     R1, #0x3E8\n"
                "BL      sub_FFC0B774\n" //TAKE SEMAPHORE
                "CMP     R0, #9\n"
                "BNE     loc_FFC4B814\n"
                "BL      sub_FFD14A94\n"
                "MOV     R0, #0x90000\n"
                "STR     R7, [R5,#0x38]\n"
                "B       loc_FFC4B82C\n"
"loc_FFC4B814:\n"
                "LDR     R0, [SP,#0x38]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC4B834\n"
                "BL      sub_FFD14A94\n"
                "MOV     R0, #0xA0000\n"
                "STR     R7, [R5,#0x38]\n"
"loc_FFC4B82C:\n"
                "BL      sub_FFC623B8\n"
                "B       loc_FFC4B790\n"
"loc_FFC4B834:\n"
                "BL      sub_FFCD00D8\n"
                "LDR     R0, [SP,#0x34]\n"
                "LDR     R1, [SP,#0x3C]\n"
                "BL      sub_FFD1483C\n"
                "LDR     R0, [R5,#0x4C]\n"
                "LDR     R1, =0x53FC\n"
                "ADD     R0, R0, #1\n"
                "STR     R0, [R5,#0x4C]\n"
                "LDR     R0, [SP,#0x3C]\n"
                "MOV     R2, #0\n"
                "BL      sub_FFD126CC_my\n" 
"loc_FFC4B860:\n"
                "LDR     R0, [R5,#0x50]\n"
                "ADD     R0, R0, #1\n"
                "STR     R0, [R5,#0x50]\n"
                "LDR     R1, [R5,#0x78]\n"
                "MUL     R0, R1, R0\n"
                "LDR     R1, [R5,#0x74]\n"
                "BL      sub_FFE683D0\n"
                "MOV     R4, R0\n"
                "BL      sub_FFD14ACC\n"
                "LDR     R1, [R5,#0x70]\n"
                "CMP     R1, R4\n"
                "BNE     loc_FFC4B89C\n"
                "LDR     R0, [R5,#0x30]\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC4B8B0\n"
"loc_FFC4B89C:\n"
                "LDR     R1, [R5,#0x84]\n"
                "MOV     R0, R4\n"

           //   "BLX     R1\n"                  
                ".long   0xE12FFF31\n"

                "STR     R4, [R5,#0x70]\n"
                "STR     R6, [R5,#0x30]\n"
"loc_FFC4B8B0:\n"
                "STR     R6, [R5,#0x2C]\n"
                "B       loc_FFC4B790\n"
 );
} 


void __attribute__((naked,noinline)) sub_FFD126CC_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "LDR     R4, =0x80EC\n"
                "LDR     LR, [R4]\n"
                "LDR     R2, [R4,#8]\n"
                "CMP     LR, #0\n"
                "LDRNE   R3, [R4,#0xC]\n"
                "MOV     R5, R2\n"
                "CMPNE   R3, #1\n"
                "MOVEQ   R2, #0\n"
                "STREQ   R0, [R4]\n"
                "STREQ   R2, [R4,#0xC]\n"
                "BEQ     loc_FFD12798\n"
                "LDR     R3, [R4,#4]\n"
                "LDR     R7, =table\n"          // *
                "ADD     R12, R3, R3,LSL#1\n"
                "LDR     R3, [R7,R12,LSL#2]\n"
                "ADD     R6, R7, #0x30\n"
                "LDR     R8, [R6,R12,LSL#2]\n"
                "SUB     R3, LR, R3\n"
                "CMP     R3, #0\n"
                "SUB     LR, LR, R8\n"
                "BLE     loc_FFD12754\n"
                "ADD     R12, R7, R12,LSL#2\n"
                "LDR     LR, [R12,#4]\n"
                "CMP     LR, R3\n"
                "ADDGE   R2, R2, #1\n"
                "BGE     loc_FFD12748\n"
                "LDR     R12, [R12,#8]\n"
                "CMP     R12, R3\n"
                "ADDLT   R2, R2, #3\n"
                "ADDGE   R2, R2, #2\n"
"loc_FFD12748:\n"
    //          "CMP     R2, #0x17\n"   // -
    //          "MOVGE   R2, #0x16\n"   // -
                "CMP     R2, #0x1A\n"   // + WHY THIS?
                "MOVGE   R2, #0x19\n"   // +
                "B       loc_FFD12788\n"
"loc_FFD12754:\n"
                "CMP     LR, #0\n"
                "BGE     loc_FFD12788\n"
                "ADD     R3, R6, R12,LSL#2\n"
                "LDR     R12, [R3,#4]\n"
                "CMP     R12, LR\n"
                "SUBLE   R2, R2, #1\n"
                "BLE     loc_FFD12780\n"
                "LDR     R3, [R3,#8]\n"
                "CMP     R3, LR\n"
                "SUBGT   R2, R2, #3\n"
                "SUBLE   R2, R2, #2\n"
"loc_FFD12780:\n"
                "CMP     R2, #0\n"
                "MOVLT   R2, #0\n"
"loc_FFD12788:\n"
                "CMP     R2, R5\n"
                "STRNE   R2, [R4,#8]\n"
                "MOVNE   R2, #1\n"
                "STRNE   R2, [R4,#0xC]\n"
"loc_FFD12798:\n"
                "LDR     R2, =CompressionRateTable\n"   // *
                "LDR     R3, [R4,#8]\n"
                "LDR     R2, [R2,R3,LSL#2]\n"

                "LDR     R3, =video_mode\n"      // +
                "LDR     R3, [R3]\n"             // +
                "LDR     R3, [R3]\n"             // +
                "CMP     R3, #1\n"               // +
                "LDREQ   R3, =video_quality\n"   // +     
                "LDREQ   R3, [R3]\n"             // +     
                "LDREQ   R2, [R3]\n"             // +     

                "STR     R2, [R1]\n"
                "STR     R0, [R4]\n"
                //"BL      mute_on_zoom\n"     // +
                "LDMFD   SP!, {R4-R8,PC}\n"
 );
} 

#include "conf.h"





int *video_quality = &conf.video_quality;
int *video_mode    = &conf.video_mode;

long def_table[24]={0x2000, 0x38D, 0x788, 0x5800, 0x9C5, 0x14B8, 0x10000, 0x1C6A, 0x3C45, 0x8000, 0xE35, 0x1E23,
           0x1CCD, -0x2E1, -0x579, 0x4F33, -0x7EB, -0xF0C, 0xE666, -0x170A, -0x2BC6, 0x7333, -0xB85, -0x15E3};

long table[24];

void change_video_tables(int a, int b){
 int i;
 for (i=0;i<24;i++) table[i]=(def_table[i]*a)/b; 
}

long CompressionRateTable[]={0x60, 0x5D, 0x5A, 0x57, 0x54, 0x51, 0x4D, 0x48, 0x42, 0x3B, 0x32, 0x29, 0x22, 0x1D, 0x17, 0x14, 0x10, 0xE, 0xB, 9, 7, 6, 5, 4, 3, 2, 1};

